package com.ds.common.route.agent;

import com.ds.common.nacos.ConfigModel;
import lombok.Data;

@Data
public class Agent implements ConfigModel {
    Integer agentId;
    String agentName;
    String agentBaseDomain;// 如 ds.com,renruikeji.cn artt.cn 等
    String description;
    Integer agentGroupId;
    // 默认 agent
    public static final Agent DEFAULT = defaultAgent();

    // 默认 Agent 生成
    private static Agent defaultAgent() {
        Agent agent = new Agent();
        agent.agentId = 0;
        agent.agentName = "renkang";
        agent.agentBaseDomain = "renruikeji.cn";
        agent.description = "renkang";
        agent.agentGroupId = 0;
        return agent;
    }

    @Override
    public boolean isValid() {
        return agentId != null && agentName != null && agentBaseDomain != null && agentGroupId != null;
    }
}
